package net.elive.server;

import java.net.InetAddress;

import net.elive.utils.LogUtils;

import org.apache.commons.logging.Log;

public class Node {
	Log log  = LogUtils.getLog(Node.class);
	/**
	 * 登录session
	 */
	private int sessionId;
	/**
	 * 活跃时间
	 */
	private long activeTime;
	/**
	 * 登录时间
	 */
	private long loginTime;
	/**
	 * 节点类型
	 */
	private short nodeType = 0;
	/**
	 * 协服务器端口
	 */
	private int assistServerPort;
	/**
	 * 服务器端口
	 */
	private int dbServerPort;
	/**
	 * 节点ip
	 */
	private InetAddress nodeIp;
	/**
	 * 路由端口
	 */
	private int routePort;
	
	public Node(InetAddress nodeIp,int sessionId,short nodeType,int routePort,int dbServerPort,int assistServerPort){
		loginTime = System.currentTimeMillis();
		this.nodeIp = nodeIp;
		this.sessionId = sessionId;
		this.nodeType = nodeType;
		this.routePort = routePort;
		this.assistServerPort = assistServerPort;
		this.dbServerPort = dbServerPort;
	}
	
	public int getDbServerPort() {
		return dbServerPort;
	}

	public InetAddress getNodeIp() {
		return nodeIp;
	}

	
	
}
